package models

type DailyDownloads struct {
	DailyDownloadId int
	ItemId int
	Counts int
	Time string
}

func (DailyDownloads) TableName() string {
	return "daily_downloads"
}

func GetDailyHotDownloads(time string, num int) (dailyDownloads []DailyDownloads)  {
	db.Debug().Where(&DailyDownloads{Time:time}).Order("counts desc").Limit(num).Find(&dailyDownloads)
	return
}


